package com.five.sbgroup5job.controller;

//吴楠
import com.five.sbgroup5job.entity.VipUser;
import com.five.sbgroup5job.service.VipUserService;
import com.five.sbgroup5job.vo.VipUserVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/vips")
public class VipUserController {

    @Resource
    private VipUserService vipUserService;

    //查询
    @RequestMapping("/vipList")
    public List<VipUser> vipUserList() {
        return vipUserService.vipUserList();
    }


    //添加
    @RequestMapping("/vipAdd")
    public String vipUserList(@RequestBody VipUserVo vipUserVo) {
        return vipUserService.vipAdd(vipUserVo);
    }

    //修改
    @RequestMapping("/vipUpdate")
    public String vipUserList1(@RequestBody VipUserVo vipUserVo) {
        return vipUserService.vipUpdate(vipUserVo);
    }

    //删除
    @RequestMapping("/vipDelete")
    public String vipUserList2(@RequestBody VipUserVo vipUserVo) {
        return vipUserService.vipDelete(vipUserVo);
    }
}
